package com.service.device;

import com.common.ErrorCodeEnum;
import com.common.emums.DataStatus;
import com.common.exception.BusinessException;
import com.common.utils.StringUtils;
import com.core.springSecurity.common.SecurityUtils;

import com.dao.secondary.device.DeviceTypeMapper;
import com.model.domain.device.GetDeviceTypeDO;
import com.model.pojo.device.DeviceType;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;



/**
 * @Author: zql
 * @Description: 【请填写功能名称】服务
 * @Data: 2024-02-28
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class DeviceTypeService {
    private final DeviceTypeMapper deviceTypeMapper;

    private List<DeviceType> getAllList(GetDeviceTypeDO getDeviceTypeDO){
        PageHelper.clearPage();
        PageHelper.orderBy(getDeviceTypeDO.getSortRow()+getDeviceTypeDO.getSortOrder());
        return deviceTypeMapper.selectList(getDeviceTypeDO);
    }
    public DeviceType getById(Integer id){
        return deviceTypeMapper.selectByPrimaryKey(id);
    }
}
